#
# Makefile
#
# Makefile for IBIS_AMI_Tx
# Copyright (c) 2007. Signal Integrity Software, Inc. (SiSoft)
# All Rights Reserved.
#
# History:
# 13 February 2007, Mike Steinberger: Removed requirement for yy_aux.o/c
# 6 February 2007, Mike Steinberger: Initial file creation
#
# Variations to be supported:
# Platforms: Windows, Linux and Solaris (SunOS?)
# With and without debug symbols
# Dependencies from makedepend
# Clean (delete all generated files)

# Platform-dependent definitions

ifeq ($(OSTYPE), linux)
BIN  = ../bin/Linux/
INC  = ../include
INCL = ../include/
vpath %.h ../include
vpath %.o ../bin/Linux
CC   = gcc
CFLAGS = -I $(INC) -g
CTXFLAGS = -fPIC
LINKFLAGS = -ldl -lm
LINKTXFLAGS = -shared -lm
LOADOBJ = LoadLinux
endif

# Platform-independent definitions

SOURCE = IBIS_AMI_tree.c IBIS_AMI_Tx.c

CCLNOBJ = IBIS_AMI_tree.o IBIS_AMI_Tx.o

CCTXOBJ = IBIS_AMI_tree.o IBIS_AMI_Tx.o

# Rules

IBIS_AMI_Tx: $(CCTXOBJ)
	cd $(BIN); $(CC) $(CCTXOBJ) $(LINKTXFLAGS) -o lib$@.so; cp lib$@.so ../../test; ls -l

$(CCLNOBJ): %.o:%.c
	$(CC) $(CFLAGS) $(CTXFLAGS) -c -o $(BIN)$@ $<

.PHONY: depend
depend:
	makedepend -I$(INC) -Y $(SOURCE)

.PHONY: clean
clean:
	rm $(BIN)*.so
	rm $(BIN)*.o
# DO NOT DELETE

IBIS_AMI_tree.o: ../include/IBIS_AMI_tree.h
IBIS_AMI_Tx.o: ../include/IBIS_AMI_Tx.h ../include/IBIS_AMI.h
IBIS_AMI_Tx.o: ../include/IBIS_AMI_tree.h
